var t = require("../component/cpsApi");

Page({
    behaviors: [ t ],
    data: {
        good: {},
        hoet: !1,
        showContent: !0,
        ratioCommissionAmount: 0,
        shareCommissionAmount: 0
    },
    onLoad: function(t) {
        this.setData({
            good: t,
            showContent: !0
        }), this.getCPSLogin("good");
    },
    getCoupon: function() {
        var t = this.data.goodsDetail.we_app_info;
        wx.navigateToMiniProgram({
            appId: t.app_id,
            path: t.page_path,
            extraData: {}
        });
    },
    toShowContent: function() {
        this.setData({
            showContent: !this.data.showContent
        });
    },
    goBack: function() {
        wx.navigateBack({
            delta: 1
        });
    },
    gotoMember: function() {
        wx.reLaunch({
            url: "/packageG/member_v2/member_v2"
        });
    },
    gotoHome: function() {
        wx.reLaunch({
            url: "/packageG/index/index"
        });
    },
    onPageScroll: function(t) {
        t.scrollTop > 35 ? this.data.hoet || this.setData({
            hoet: !0
        }) : this.data.hoet && this.setData({
            hoet: !1
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareTimeline: function() {
        var t = wx.getStorageSync("yz_uid"), o = "";
        return t && (o = t), {
            title: this.data.goodsDetail.title,
            query: "item_id=".concat(this.data.good.item_id, "&platform_id=").concat(this.data.good.platform_id, "&mid=").concat(o)
        };
    },
    onShareAppMessage: function() {
        var t = wx.getStorageSync("yz_uid"), o = "";
        return t && (o = t), {
            title: this.data.goodsDetail.title,
            path: "/packageG/cps/cpsGoodDetail/cpsGoodDetail?item_id=".concat(this.data.good.item_id, "&platform_id=").concat(this.data.good.platform_id, "&mid=").concat(o)
        };
    }
});